package LuoGu;

import java.util.Scanner;

public class P2241 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int z = 0;
        int c = 0;

        for (int i = 0; i <= n; i++) {
            for (int k = i + 1; k <= n; k++) {
                for (int h = 0; h <= m; h++) {
                    for (int j = h+1; j <= m; j++) {
                       if(Math.abs(i-k)==Math.abs(h-j)){
                           z++;
                       }else{
                           c++;
                       }
                    }
                }

            }
        }
        System.out.println(z+" "+c);
    }

}
